#include "stdlib.h"
#include "Utils.h"
using namespace std;

int Utils::getLiczba(ifstream& in)
{
	char c;
	char s[10];
	int count = 0;
	do
	{
		in.get(c);
		if (in.eof()) break;
		s[count++] = c;
		//cout << ".";
	}
	while (c != '\t' && c != ' ' && c != '\n');
	//cout << "liczba " << atoi(s) << "\n";
	return atoi(s);
}

void Utils::ignorujSpacje(ifstream& in)
{
	while(in.peek() == ' ')
	{
		in.get();
	}
}

void Utils::ignorujTab(ifstream& in, int n)
{
	char c;
	int i = 0;
	while (i < n)
	{
		in.get(c);
		if (in.eof()) break;
		if (c == '\t') i++;
	}
}
